<template>
  <div>
  </div>
</template>
<script lang="ts">
import {defineComponent} from 'vue'
import Setting from "@/public/config"
import Oidc from 'oidc-client'

export default defineComponent({
  components: {
  },
  setup() {
    const config = {
      authority: Setting.Authority,
      client_id: "backend-admin",
      client_secret: "1q2w3e*",
      redirect_uri: Setting.SelfHost + Setting.Ports.BigScreen + "/user/login-callback",
      response_type: "code",
      scope: 'notification-management openid profile role offline_access account common-data big-data asset workflows visual-command internet-of-things internal-gateway hikvision identity narcissus',
      post_logout_redirect_uri: Setting.SelfHost + Setting.Ports.BigScreen + "/user/loginout"
    }
    
    const mgr = new Oidc.UserManager(config);
    mgr.signinRedirect().then(res => {
      console.log(res);
      
    }).catch(err => {
      console.log(err)
    })

    return { 
      
    }
  }
})
</script>
<style lang="scss" scoped>
@import '@/assets/scss/index.scss';
</style>